using UnityEngine;
using System.Collections;

public class DrawWaypointGizmos : MonoBehaviour {
	
	/// <summary>
	/// Os waypoints por onde o carro irá passar.
	/// </summary>
	Transform[] waypoints;
	
	void OnDrawGizmos()
	{
		
		waypoints = gameObject.GetComponentsInChildren<Transform>();
		
		//Desenha um cubo na posição de cada waypoint.
		foreach(Transform waypoint in waypoints)
		{
			Gizmos.DrawCube(waypoint.transform.position, Vector3.one * 5);
		}
	}
}
